#include "notic.h"
#include <QDebug>

Notic::Notic(QWidget *parent) : QWidget(parent)
{



}

void Notic::noticSound()
{
    delayFunc(3000);
    qDebug() << QTime::currentTime();
    QSound::play("./gzzding.wav");
    delayFunc(6000);
    qDebug() << QTime::currentTime();
    QSound::play("./gzzdong.wav");
    //此处出现提示

}

void Notic::delayFunc(const unsigned int mesc)
{
    QTime reachTime = QTime::currentTime().addMSecs(mesc);
    while (reachTime > QTime::currentTime())
    {
        QCoreApplication::processEvents(QEventLoop::AllEvents,100);
    }

}
